package com.etl.dataflow.executor.element;

import cn.hutool.json.JSONObject;

/**
 * @author dx
 * @since 2022/4/14
 */
public abstract class Row {
    protected static final int DEFAULT_SIZE = 10;

    public void addColumn(Column<?> column) {
        setColumn(getColumnNumber() + 1, column);
    }

    public abstract Column<?> getColumn(int i);

    public abstract void setColumn(int i, Column<?> column);

    public abstract int getColumnNumber();

    public abstract JSONObject toJson();

    public abstract int getContentByteSize();

    public abstract int getMemorySize();

    public abstract Column<?> getColumnByName(String name);
}
